home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
BASIC
/
0745.ZIP
/
QBATTR.TXT
< prev
next >
Wrap
Text File
|
1986-09-22
|
4KB
|
104 lines
QuickBASIC 2.00 DISPLAY ATTRIBUTES
----------------------------------
by
Ian M. Beguesse
Tampa, FL
Microsoft QuickBASIC Version 2.00 allows you to change the default
foreground and background colors of the text, but nothing else. The
information in this file shows you how to use DEBUG to change the color
attributes of any or all aspects of the QB display screen.
Use the following procedure:
C>REN QB.EXE QB ; Rename a copy of QB.EXE
C>DEBUG QB ; Invoke the debugger
-R ; The registers are displayed.
; Note the DS register, say 'xxxx'
-H 2666 xxxx ; This displays two hex numbers
; Note the first, say 'yyyy'
-RDS ; This allows you to change the DS register
DS zzzz ; 'DS zzzz' is displayed
:yyyy ; type 'yyyy', the first of the 2 hex numbers
-D 1A LC ; This displays the color attribute bytes
-D 26 LC ; This displays the monochrome attribute bytes
The following table shows the locations, original contents and what
they are used for.
===== COLOR ===== ===== MONO ======
-----------------------------------------------------------------
LOCATION DEFAULT LOCATION DEFAULT USED FOR
-----------------------------------------------------------------
1A 02 26 07 Border
1B 1C 27 07 Text
1C 74 28 07 Windows - border & headings
1D 74 29 07 Help border & CANCEL box
1E 71 2A 07 Windows - text
1F 30 2B 70 Menu - title bar
20 03 2C 07 Menu - selected title
21 02 2D 07 Menu - box outline
22 0F 2E 0F Menu - bright text
23 07 2F 07 Menu - dim text
24 70 30 70 Menu - selected item
25 20 31 70 Scroll Bars
How to "read" attributes:
An attribute byte has two parts. The background is given by the first
hex character and the foreground by the second. For example if the
attribute is 74, 7 represents the background, and 4 represents the
foreground color. All the possible colors are these:
BACKGROUND or FOREGROUND:
0 Black
1 Blue
2 Green
3 Cyan
4 Red
5 Magenta
6 Brown
7 White
FOREGROUND ONLY:
8 Gray
9 Light Blue
A Light Green
B Light Cyan
C Light Red
D Light Magenta
E Yellow
F Bright White
To change an attribute, select the desired foreground and background.
For example, bright white on red would be 4F. Then make the change as
follows.
-E aa bb ; Where 'aa' is the location
; and 'bb' is the desired attribute.
When you are finished, type
-W ; This saves the changes
-Q ; Takes you back to DOS
C>REN QB QB.EXE ; Restore original name.
Now execute 'QB' to see your changes in effect.
re original name.
Now execute 'QB' to see your changes in effect.